﻿@model PagedList.IPagedList<e_commerce.Foreground.Models.Goods>
@using PagedList.Mvc

@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_ShopMallLayout.cshtml";
}
<nav>
    <a href="/Page/Home">首页</a>>
    <a href="/Page/List">全部商品</a>
</nav>

<div class="goods-list">
    <div class="goods-list-title">
        <a href="javascripts:void(0);">推荐</a>
     @*   <a href="javascripts:void(0);">仅显示有货商品</a>*@
    </div>
    <div class="goods-list-wrap">
        @foreach (var item in Model)
        {
            <div class="goods">
                <a href="~/Page/Detail?goodsId=@item.GoodsId">
                    <img src=@item.Images />
                </a>
                <span class="goods-name">@item.GoodsName</span>
                <span class="goods-price">￥@item.Price</span>
            </div>
        }
    </div>
    <div class="goods-list-page">
        @Html.PagedListPager(Model, page => Url.Action("List", new { page }))
    </div>
</div>
@section Styles{
    <link href="~/CSS/list.css" rel="stylesheet" />
    <link href="~/Content/PagedList.css" rel="stylesheet" />
}